package io.gimo.study.design_pattern.factory.abstract_factory.product;


import io.gimo.study.design_pattern.factory.abstract_factory.Sortor;

import java.util.Arrays;

public class BubbleSortor implements Sortor {

	@Override
	public void sort(int[] target) {
		for (int i = 0; i < target.length; i++) {
			for (int j = 0; j < target.length - i - 1; j++) {
				if(target[j] > target[j+1]){
					int temp = target[j];
					target[j] = target[j+1];
					target[j+1] = temp;
				}
			}
		}
		System.out.println(Arrays.toString(target));
	}

}
